FROM node:18-alpine
RUN mkdir -p /app
WORKDIR /app
COPY package.json /app/
RUN npm i --registry=https://registry.npm.taobao.org
RUN npm run build
COPY ./.output /app/.output
EXPOSE 3000

# 修改package.json，增加start命令
# "start": "node .output/server/index.mjs",
ENTRYPOINT ["npm", "run", "start"]